package com.workshop.web;


import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import com.workshop.service.IACategoryService;
import com.workshop.utils.check.CheckUtil;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author chengluqiang
 * @since 2019-04-13
 */
@RestController
@RequestMapping("/aCategory")
public class ACategoryController {
	
	@Resource
	private IACategoryService categoryService;
	
	@PostMapping("/list")
    public Map<String,Object> list(Long pageStart, Long pageTotal){
        return categoryService.list(pageStart,pageTotal);
    }
	
	@PostMapping("/setCategory")
	public Map<String,Object> setCategory(String json){
        return categoryService.setCategory(json);
    }

    @PostMapping("add")
    public Map<String,Object> add(String name){
        return categoryService.add(name);
    }

    @PostMapping("del")
    public Map<String,Object> del(String ids){
        return categoryService.del(ids);
    }
}

